//
//  NSObject+GLSingle.m
//  GLLibDemo
//
//  Created by huanggulong on 2017/4/29.
//  Copyright © 2017年 历山大亚. All rights reserved.
//

#import "NSObject+GLSingle.h"

@implementation NSObject (GLSingle)

+ (instancetype)share{
    static NSMutableDictionary * instance;
    if (instance == nil) {
        instance = [NSMutableDictionary dictionary];
    }
    NSString *classString = NSStringFromClass([self class]);
    id im = [instance objectForKey:classString];
    if (im == nil) {
        im = [[self alloc] init];
        [instance setObject:im forKey:classString];
    }
    return im;
}

@end
